const jsonBaseUrl = import.meta.env.VITE_JSON_API_BASE_URL

export interface JSONResponse<T = unknown> {
  code: number
  data: T
  message: string
}

const api: ApiConfig = {
  content: {
    method: 'GET',
    url: '/content',
    baseURL: jsonBaseUrl
  },
  selectJsonUrlByCode: {
    method: 'GET',
    url: '/collection/baseCollectClassificationConfig/selectJsonUrlByCode',
  },
  list: {
    method: 'GET',
    url: '/list',
    baseURL: jsonBaseUrl
  },
  save: {
    method: 'POST',
    url: '/save',
    baseURL: jsonBaseUrl
  }
}

export default api
